/**
 *  Copyright (C) 2006 zhangbo (freeeob@gmail.com)
 *
 *  This product is free software; you can redistribute it and/or modify
 *  it under the terms of the GNU Lesser General Public License as published by
 *  the Free Software Foundation; either version 2.1 of the License, or
 *  (at your option) any later version.
 * 
 *  This product is distributed in the hope that it will be useful,
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *  GNU Lesser General Public License for more details.
 * 
 *  You should have received a copy of the GNU Lesser General Public License
 *  along with this library; if not, write to the Free Software
 *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA.
 *
 *  author:zhangbo
 *  Email:jsjava@gmail.com
 */

/**
 * Constructor
 */
function OSUtils(){
	this.jsjava_class="jsorg.eob.os.OSUtils";
}

/**
 * Check whether the current OS is Windows
 */
OSUtils.isWindows=function(){
	return navigator.userAgent.indexOf("Win")!=-1;
};

/**
 * Check whether the current OS is Windows 95
 */
OSUtils.isWindows95=function(){
	return navigator.userAgent.indexOf("Win95") > -1|| navigator.userAgent.indexOf("Windows 95") > -1;
};

/**
 * Check whether the current OS is Windows 98
 */
OSUtils.isWindows98=function(){
	return navigator.userAgent.indexOf("Win98") > -1|| navigator.userAgent.indexOf("Windows 98") > -1;
};

/**
 * Check whether the current OS is Windows ME
 */
OSUtils.isWindowsME=function(){
	return navigator.userAgent.indexOf("Win 9x 4.90") > -1|| navigator.userAgent.indexOf("Windows ME") > -1;
};

/**
 * Check whether the current OS is Windows 2000
 */
OSUtils.isWindows2000=function(){
	return navigator.userAgent.indexOf("Windows NT 5.0") > -1|| navigator.userAgent.indexOf("Windows 2000") > -1;
};

/**
 * Check whether the current OS is Windows XP
 */
OSUtils.isWindowsXP=function(){
	return navigator.userAgent.indexOf("Windows NT 5.1") > -1|| navigator.userAgent.indexOf("Windows XP") > -1;
};

/**
 * Check whether the current OS is Windows NT4.0
 */
OSUtils.isWindowsNT4=function(){
	return navigator.userAgent.indexOf("Windows NT 4.0") > -1|| navigator.userAgent.indexOf("Windows NT") > -1|| navigator.userAgent.indexOf("WinNT4.0") > -1;
};

/**
 * Check whether the current OS is Mac
 */
OSUtils.isMac=function(){
	return navigator.userAgent.indexOf("Mac")!=-1;
};

/**
 * Check whether the current OS is Unix
 */
OSUtils.isUnix=function(){
	return navigator.userAgent.indexOf("X11")!=-1;
};

/**
 * Check whether the current OS is Sun serials
 */
OSUtils.isSun=function(){
	return navigator.userAgent.indexOf("SunOS")!=-1;
};